package com.sxxm.qxgl.controller;


import com.sxxm.qxgl.entity.SysRole;
import com.sxxm.qxgl.entity.UserRole;
import com.sxxm.qxgl.service.UserRoleService;
import com.sxxm.qxgl.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 用户角色关系表 前端控制器
 * </p>
 *
 * @author qjw
 * @since 2021-09-14
 */
@RestController
@Api(value = "角色-用户", tags = "角色-用户")
@RequestMapping("/user-role")
public class UserRoleController {
    UserRoleService userRoleService;
    public UserRoleController(UserRoleService userRoleService){
        this.userRoleService = userRoleService;
    }

    @ApiOperation("角色添加用户")
    @PostMapping ("/tjyh")
    public Result tjyh(@RequestBody UserRole userRoles){
        return userRoleService.Batch_add(userRoles);
    }

    @ApiOperation("角色删除用户")
    @PostMapping("/Delete")
    public Result Delete(@RequestBody UserRole userRoles){
        return userRoleService.Delete(userRoles);
    }

}

